<?php
	class VipsModel extends RelationModel{
		protected $tableName = 'vips';	
		protected $_link = array(
			'orders'	=>  array(
				'mapping_type'	=>	HAS_MANY,
				'foreign_key'	=>  'vip_id',
				'mapping_fields' => 'order_id,order_time,status,goods_id'
			),
			'cars'		=>	array(
				'mapping_type'	=>	HAS_MANY,
				'foreign_key'	=>	'vip_id',
				'mapping_fields' => 'car_num'
			)
		);
	}
?>